package org.zxp.designpattern.singleton;

/**
 * @program: effectiveJava
 * @description: 饿汉 线程安全
 * @author: X-Pacific zhang
 * @create: 2019-08-21 21:12
 **/
public class Singleton1 {
    private static Singleton1 INSTANCE = new Singleton1();

    private Singleton1(){
    }

    public static Singleton1 getInstance(){
        return INSTANCE;
    }

    @Override
    public String toString() {
        return this.hashCode()+"";
    }
}
